package cn.rengy.web.framework.sys.action;

import java.util.concurrent.Callable;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.rengy.web.framework.cache.CacheService;
import cn.rengy.web.framework.sql.DbService;

@Service
public class SysActionService {
	@Autowired
	private DbService dbService;
	@Autowired
	private CacheService cacheService;
	public SysActionPO getSysAction(String actionId){
		return cacheService.getLocalCache("sysActionCache", actionId, new Callable<SysActionPO>() {
	        @Override
	        public SysActionPO call() throws Exception {
	        	return dbService.queryForBean("select_get_sys_action", SysActionPO.class, actionId);
	        }
	    });
	}
}
